home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group92c.txt
/
000084_icon-group-sender _Fri Nov 13 12:27:32 1992.msg
< prev
next >
Wrap
Internet Message Format
|
1993-01-04
|
1KB
Received: by cheltenham.cs.arizona.edu; Fri, 13 Nov 1992 11:31:46 MST
Date: Fri, 13 Nov 92 12:27:32 EST
From: Paul_Abrahams@MTS.cc.Wayne.edu
To: icon-group@cs.arizona.edu
Message-Id: <527005@MTS.cc.Wayne.edu>
Subject: Second argument to sortf
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
Greg Townsend has told us that he just didn't think of the possibility
of using a field name as the second argument to sortf when he built it.
Given that it's too late to redo the design, what's the best way to provide
this obviously useful functionality?
(1) Perhaps the implementation could be modified, as Jerry Nowlin suggested,
to overload the second argument so that a field name would be interpreted
as the key field.
(2) But an even neater approach, which wouldn't require modifying sortf at
all, would be an Icon function fieldpos(rectype, fld) that would take a
record type and field name as inputs and would yield the field position
as output. Such a function would probably have other uses as well.
Paul Abrahams